basic conditional execution and loops in python